package com.lwc.cfdns.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lwc.cfdns.pojo.bo.system.RoleBO;
import com.lwc.cfdns.pojo.dto.ChangeStatusDTO;
import com.lwc.cfdns.pojo.dto.system.RoleAuthUserDTO;
import com.lwc.cfdns.pojo.dto.system.RoleDTO;
import com.lwc.cfdns.pojo.dto.system.RoleDataScopeDTO;
import com.lwc.cfdns.pojo.entity.SystemRole;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lwc.cfdns.pojo.vo.system.RoleVO;

import java.util.List;
import java.util.Map;

/**
 * @author spring
 * @description 针对表【cfdns_system_role(角色信息表)】的数据库操作Service
 * @createDate 2023-05-23 15:18:02
 */
public interface SystemRoleService extends IService<SystemRole> {

    /**
     * 创建
     *
     * @param roleDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/23 15:30:23
     */
    Map<String, Object> create(RoleDTO roleDTO);

    /**
     * 详情
     *
     * @param id
     * @return RoleVO
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/23 15:30:43
     */
    RoleVO view(Long id);

    /**
     * 更新
     *
     * @param id
     * @param roleDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/23 15:33:31
     */
    Map<String, Object> update(Long id, RoleDTO roleDTO);

    /**
     * 删除
     *
     * @param ids
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/23 15:33:59
     */
    Map<String, Object> delete(String ids);

    /**
     * 列表
     *
     * @param roleBO
     * @return IPage<SystemRole>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/23 15:38:50
     */
    IPage<SystemRole> lists(RoleBO roleBO);

    /**
     * 树
     *
     * @param roleBO
     * @return List<RoleVO>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/23 16:05:42
     */
    List<Map<String, Object>> tree(RoleBO roleBO);

    /**
     * 状态修改
     *
     * @param changeStatusDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/28 16:00
     */
    Map<String, Object> changeStatus(ChangeStatusDTO changeStatusDTO);

    /**
     * 数据权限
     *
     * @param roleDataScopeDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/30 10:16:24
     */
    Map<String, Object> dataScope(RoleDataScopeDTO roleDataScopeDTO);

    /**
     * 批量给角色添加授权用户
     *
     * @param roleAuthUserDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/30 13:48:15
     */
    Map<String, Object> addAuthUser(RoleAuthUserDTO roleAuthUserDTO);

    /**
     * 批量给角色取消授权用户
     *
     * @param roleAuthUserDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/30 13:49:34
     */
    Map<String, Object> cancelAuthUser(RoleAuthUserDTO roleAuthUserDTO);
}
